class UserVo {
  String avatar;
  int defaultAccountBookId;
  String userCode;
  int userId;
  String userName;
  String userType;

  UserVo(
      {this.avatar,
      this.defaultAccountBookId,
      this.userCode,
      this.userId,
      this.userName,
      this.userType});

  UserVo.fromJson(Map<String, dynamic> json) {
    if (json["avatar"] is String) this.avatar = json["avatar"];
    if (json["defaultAccountBookId"] is int)
      this.defaultAccountBookId = json["defaultAccountBookId"];
    if (json["userCode"] is String) this.userCode = json["userCode"];
    if (json["userId"] is int) this.userId = json["userId"];
    if (json["userName"] is String) this.userName = json["userName"];
    if (json["userType"] is String) this.userType = json["userType"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data["avatar"] = this.avatar;
    data["defaultAccountBookId"] = this.defaultAccountBookId;
    data["userCode"] = this.userCode;
    data["userId"] = this.userId;
    data["userName"] = this.userName;
    data["userType"] = this.userType;
    return data;
  }
}
